function [C]=PolyCost(mu,p,gamma_g,gamma_b)

    n = 5; 
    f = @(x) x^n;
    C=-1*(f(mu)+ f(1-mu)- p*(f(gamma_g)+f(1-gamma_g))-(1-p)*(f(gamma_b)+f(1-gamma_b)));
    %C=1*(p*f(abs(gamma_g - mu))+ (1-p)*f(abs(gamma_b - mu)));
end

